<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <table>
            <thead>
                <tr>
                    <th>商品状态</th>
                    <th>商品id</th>
                    <th>商品名称</th>
                    <th>商品价格</th>
                    <th>购买数量</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr v-for="(value,index) in school">
                    <th><input type="checkbox" v-model="value.zhuangtai"></th>
                    <th>{{value.id}}</th>
                    <th>{{value.name}}</th>
                    <th>{{value.price}}</th>
                    <th>
                        <button @click="jian(index)">-</button>
                        {{value.num}}
                        <button @click="add(index)">+</button>
                    </th>
                    <th><button @click="remove(index)">移除</button></th>
                </tr>
            </tbody>
            <tfoot>
                <tr>
                    <th><label for="quan">是否全选</label><input type="checkbox" v-model="quan" id="quan" @click="qx()"> </th>
                    <th>总价为{{zong}}</th>
                </tr>
                
            </tfoot>
        </table>
    </div>

    <script src="./node_modules/vue/dist/vue.js"></script>
    <script src="./js/购物车.js"></script>
</body>
</html>